<template>
    <div>
      <div v-for="(hostport,index) in hostportList" :key="index">
          {{hostport.hostName}}:{{hostport.port}}
      </div>
    </div>
</template>

<script>
    import axios from 'axios'
    export default {
        name: "Home",
        data(){
          return {
            hostportList:[]
          }
        },
        mounted:function () {
          const url=`/api/proxy/getAllProxy`
          axios.get(url).then(
            response=>{
              this.hostportList.splice(0,this.hostportList.length,...response.data);
            }
          ).catch(error=>{
            console.log("error")
          })
        }
    }
</script>

<style scoped>

</style>
